import request from '@/utils/request'

// 查询列表
export function GetListAPI(params) {
    return request({
        url: '/equipment/patrol-work-order/list',
        method: 'GET',
        params
    })
}

// 新增
export function AddDataAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/add',
        method: 'POST',
        data
    })
}

// 修改
export function EditDataAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/updatePatrolWorkOrder',
        method: 'PUT',
        data
    })
}

// 查询单个
export function GetDeiltsAPI(params) {
    return request({
        url: '/equipment/patrol-work-order/getView/' + params,
        method: 'GET'
    })
}

// 删除单个
export function DelDataAPI(params) {
    return request({
        url: '/equipment/patrol-work-order/deleteWorkOrder/' + params,
        method: 'DELETE'
    })
}

// 派工
export function DispatchAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/dispatch',
        method: 'POST',
        data
    })
}

// 执行保养
export function ExecuteAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/execute',
        method: 'POST',
        data
    })
}

// 提交审核
export function AuditAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/audit/' + data,
        method: 'GET'
    })
}

// 撤销审核
export function RevocationAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/revocation/' + data,
        method: 'GET'
    })
}

// 单据审核
export function DocumentAuditAPI(data) {
    return request({
        url: '/equipment/patrol-work-order/documentAudit',
        method: 'POST',
        data
    })
}